package com.culture.bootdemo.算法.meituan;

/**
 * @author: wen
 * @date 2020/10/23
 * 字符串内容倒叙：
 *      将字符串从后往前遍历，依次获取char类型数据，拼接
 */
public class 字符串倒叙 {

    public static void main(String[] args) {
        String a = "abcde";
        String result = "";
        for (int i = a.length() - 1; i >= 0; i--) {
            char c = a.charAt(i);
            result += c;
        }
        System.out.println(result);
    }
}
